<?php
/**
 * Created by PhpStorm.
 * User: http
 * Date: 2018/7/13
 * Time: 15:36
 */

namespace Category\Model\CategoryProductList\Home;


class GetCategoryListModel
{

    private $model;
    private $categoryModel;

    public function __construct()
    {
        $this->model = new \Category\Model\CategoryProductList\CategoryListModel();
        $this->categoryModel = $this->model->getDocumentModel();
    }

    public function get_list()
    {

        $where['pid'] = $this->model->getCategoryId();
		$where['status'] = 1;
		$where['model']= $this->model->getDocumentModelId();
        return $this->categoryModel->field( 'title , id' )->where( $where )->select();
    }

}